package com.heatingcharge.common.util;

import com.heatingcharge.entity.base.ChargePrice;

import java.math.BigDecimal;

/**
 * Created with IntelliJ IDEA.
 * Description: heating_charge_server
 * User: Devin
 * Date: 2019-11-04
 * Time: 13:59
 */
public class ChargeUtil {

    /**
     * 根据房间类型获取供热单价
     * @param chargePrice
     * @param houseType
     * @return
     */
    public static BigDecimal getChargeUnitPrice(ChargePrice chargePrice, Integer houseType){
        switch (houseType){
            case 1:{
                return chargePrice.getCivilPrice();
            }
            case 2:{
                return chargePrice.getComlPrice();
            }
            case 3:{
                return chargePrice.getPubuildPrice();
            }
            case 4:{
                return chargePrice.getLowincoPrice();
            }
        }
        return new BigDecimal(0);
    }
}
